<div class="form">
<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'horizontalForm',
    'type'=>'horizontal',
	'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>

     	<fieldset>
		<legend>
			<span class="required">*</span> Wajib Diisi.
		</legend>

	<?php echo $form->errorSummary($model,'Opps!!!', null,array('class'=>'alert alert-error span12')); ?>
        		
   <div class="control-group">		
			<div class="span4">

	
	<?php echo $form->textFieldRow($model,'nama',array('class'=>'span5','maxlength'=>100)); ?>


	<?php echo $form->textFieldRow($model,'tempat_lahir',array('class'=>'span3','maxlength'=>100)); ?>

	<div class="control-group">
          
                <label class="control-label">Tanggal Lahir</label>
                <div class="controls">
                    <?php
                    $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                        'model'=>  $model,
                        'attribute'=>'tanggal_lahir',
                        'id'=>'tanggal_lahir',
                        'options'=>array(
                            'dateFormat'=>'dd-mm-yy',
                            'changeMonth'=>'true',
                            'changeYear'=>'true',
                            'constrainInput'=>'false',
                            'duration'=>'fast',
                            'showAnim'=>'slide',
                        ),
                        'htmlOptions' => array("style" => "width: 100px"),
                    ));
                    ?>
                    
                
                </div>
            </div>
	

	<?php echo $form->dropDownListRow($model, 'kelamin', array('l' => 'Laki-Laki', 'p' => 'Perempuan'), array('prompt'=>'Jenis Kelamin')); ?>

	<?php echo $form->textAreaRow($model,'tempat_tinggal',array('rows'=>2, 'cols'=>40, 'class'=>'span5')); ?>

	<?php echo $form->dropDownListRow($model, 'agama', array('Islam' => 'Islam', 'Kristen Protestan' => 'Kristen Protestan',
		'Katolik' => 'Katolik', 'Hindu' => 'Hindu', 'Budha' => 'Budha', 'Konghucu' => 'Konghucu'
	), array('prompt'=>'Agama')); ?>


	<?php echo $form->textFieldRow($model,'warganegara',array('class'=>'span3','maxlength'=>100)); ?>


	<?php echo $form->textAreaRow($model,'ciri_fisik',array('rows'=>2, 'cols'=>40, 'class'=>'span5')); ?>


	<?php echo $form->textAreaRow($model,'kejahatan',array('rows'=>2, 'cols'=>40, 'class'=>'span5')); ?>


	<?php echo $form->textAreaRow($model,'keterangan_tambahan',array('rows'=>2, 'cols'=>40, 'class'=>'span5')); ?>


	<?php echo $form->dropDownListRow($model, 'tampil', array(1 => 'Ya', 2 => 'Tidak'), array('prompt'=>'Tampilkan')); ?>


	<?php
	if($model->isNewRecord){
	?>
	<div class="row">
		<?php echo $form->fileFieldRow($model, 'photo'); ?>
		<?php echo $form->error($model,'photo'); ?>
	</div>
	<?php
	}else{
	?>
	<div class="row">
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/buronan/<?php echo $model->photo; ?>" height="200" width="200" />
		<?php echo $form->fileFieldRow($model, 'photo'); ?>
		<?php echo $form->error($model,'photo'); ?>
	</div>
	<?php
	}
	?>

  </div>   
  </div>

	<div class="form-actions" style="text-align:center">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
                        'icon'=>'ok white',  
			'label'=>$model->isNewRecord ? 'Tambah' : 'Simpan',
		)); ?>
              <?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'reset',
                        'icon'=>'remove',  
			'label'=>'Reset',
		)); ?>
	</div>
</fieldset>

<?php $this->endWidget(); ?>

</div>
